package com.woodws.fresh.square.dao;

import com.woodws.fresh.square.api.dto.DynamicDto;
import org.beetl.sql.mapper.BaseMapper;
import org.beetl.sql.mapper.annotation.SqlResource;
import org.springframework.stereotype.Repository;

import java.util.List;

@SqlResource("dynamic")
@Repository
public interface DynamicDao extends BaseMapper<DynamicDto> {

    List<DynamicDto> getAllDynamicList(Integer currentPage, Integer pageSize);

    Integer getAllDynamicListCount();

    List<DynamicDto> getDynamicListForUserId(String userId, Integer currentPage, Integer pageSize);

    Integer getDynamicListForUserIdCount(String userId);

    List<DynamicDto> getTopDynamicListForUserId(String userId);

    Integer deleteDynamic(String dynamicId);

    Integer publishDynamic(DynamicDto dynamicDto);

    Integer giveALikeDynamic(String dynamicId);

    Integer ungiveALikeDynamic(String dynamicId);

    Integer addForwardCount(String dynamicId);

    Integer subForwardCount(String dynamicId);

    DynamicDto getDynamicById(String dynamicId);

    Integer giveADislikeDynamic(String dynamicId);

    Integer ungiveADislikeDynamic(String dynamicId);
}
